const {override, fixBabelImports, addLessLoader, setWebpackPublicPath} = require('customize-cra');
const args = [
  fixBabelImports('import', {
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: true,
  }),
  addLessLoader({
    javascriptEnabled: true,
    modifyVars: {},
  })
]

if (process.env.NODE_ENV === "production") {
  args.push(
    setWebpackPublicPath('/admin')
  )
}
module.exports = override.apply(null, args);
